<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>spring boot使用@async异步任务 | 小森的博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="javaspring bootAsync异步" />
  
  
  
  
  <meta name="description" content="github项目地址：https://github.com/lgsdaredevil/asyncTest 开启异步任务在应用主类中添加@EnableAsync注解 写异步任务方法12345678910111213@Async   public Future&amp;lt;String&amp;gt; ansync(String name)&amp;#123;       try &amp;#123;           Thre">
<meta name="keywords" content="java,spring boot,Async,异步">
<meta property="og:type" content="article">
<meta property="og:title" content="spring boot使用@Async异步任务">
<meta property="og:url" content="http://github.com/lgsdaredevil/2018/07/17/spring-boot使用@Async异步任务/index.html">
<meta property="og:site_name" content="小森的博客">
<meta property="og:description" content="github项目地址：https://github.com/lgsdaredevil/asyncTest 开启异步任务在应用主类中添加@EnableAsync注解 写异步任务方法12345678910111213@Async   public Future&amp;lt;String&amp;gt; ansync(String name)&amp;#123;       try &amp;#123;           Thre">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://raw.githubusercontent.com/lgsdaredevil/newblog/resource-newblog/source/favicons/article/QQ20180717111459.png">
<meta property="og:updated_time" content="2018-07-28T02:43:57.424Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="spring boot使用@Async异步任务">
<meta name="twitter:description" content="github项目地址：https://github.com/lgsdaredevil/asyncTest 开启异步任务在应用主类中添加@EnableAsync注解 写异步任务方法12345678910111213@Async   public Future&amp;lt;String&amp;gt; ansync(String name)&amp;#123;       try &amp;#123;           Thre">
<meta name="twitter:image" content="https://raw.githubusercontent.com/lgsdaredevil/newblog/resource-newblog/source/favicons/article/QQ20180717111459.png">
  
    <link rel="alternate" href="/atom.xml" title="小森的博客" type="application/atom+xml">
  

  

  <link rel="icon" href="/newblog/css/images/mylogo.jpg">
  <link rel="apple-touch-icon" href="/newblog/css/images/mylogo.jpg">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/9749f0/00000000000000000001008f/27/l?subset_id=2&fvd=n5) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/90cf9f/000000000000000000010091/27/l?subset_id=2&fvd=n7) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/8a5494/000000000000000000013365/27/l?subset_id=2&fvd=n4) format("woff2");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/d337d8/000000000000000000010095/27/l?subset_id=2&fvd=i4) format("woff2");font-weight:400;font-style:italic;}</style>
  <link rel="stylesheet" href="/newblog/css/style.css">

  <script src="/newblog/js/jquery-3.1.1.min.js"></script>
  <script src="/newblog/js/bootstrap.js"></script>

  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/newblog/css/bootstrap.css" >

  
    <link rel="stylesheet" href="/newblog/css/dialog.css">
  

  

  
    <link rel="stylesheet" href="/newblog/css/header-post.css" >
  

  
  
  
    <link rel="stylesheet" href="/newblog/css/vdonate.css" >
  

</head>



  <body data-spy="scroll" data-target="#toc" data-offset="50">


  
  <div id="container">
    <div id="wrap">
      
        <header>

    <div id="allheader" class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-inner">
          
          <div class="container"> 
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>

            
              <a class="brand" style="
                 margin-top: 0px;"  
                href="#" data-toggle="modal" data-target="#myModal" >
                  <img width="124px" height="124px" alt="Hike News" src="/newblog/css/images/mylogo.jpg">
              </a>
            
            
            <div class="navbar-collapse collapse">
              <ul class="hnav navbar-nav">
                
                  <li> <a class="main-nav-link" href="/newblog/">主页</a> </li>
                
                  <li> <a class="main-nav-link" href="/newblog/archives">文章</a> </li>
                
                  <li> <a class="main-nav-link" href="/newblog/categories">分类</a> </li>
                
                  <li> <a class="main-nav-link" href="/newblog/tags">标签</a> </li>
                
                  <li> <a class="main-nav-link" href="/newblog/about">关于</a> </li>
                
                  <li><div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="Type something..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/newblog/',
        CONTENT_URL: '/newblog/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/newblog/js/insight.js"></script>

</div></li>
            </div>
          </div>
                
      </div>
    </div>

</header>



      
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-spring-boot使用@Async异步任务" style="width: 75%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
  <div id="articleInner" class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      spring boot使用@Async异步任务
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	<a href="/newblog/2018/07/17/spring-boot使用@Async异步任务/" class="article-date">
	  <time datetime="2018-07-17T03:04:05.000Z" itemprop="datePublished">2018-07-17</time>
	</a>

      
    <a class="article-category-link" href="/newblog/categories/技术文章项目/">技术文章项目</a>

      
	<a class="article-views">
	<span id="busuanzi_container_page_pv">
		PV:<span id="busuanzi_value_page_pv"></span>
	</span>
	</a>

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <p>github项目地址：<a href="https://github.com/lgsdaredevil/asyncTest">https://github.com/lgsdaredevil/asyncTest</a></p>
<h4 id="开启异步任务"><a href="#开启异步任务" class="headerlink" title="开启异步任务"></a>开启异步任务</h4><p>在应用主类中添加@EnableAsync注解<br><img src="https://raw.githubusercontent.com/lgsdaredevil/newblog/resource-newblog/source/favicons/article/QQ20180717111459.png" alt="在应用主类中添加注解"></p>
<h4 id="写异步任务方法"><a href="#写异步任务方法" class="headerlink" title="写异步任务方法"></a>写异步任务方法</h4><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs java"><span class="hljs-meta">@Async</span><br>   <span class="hljs-function"><span class="hljs-keyword">public</span> Future&lt;String&gt; <span class="hljs-title">ansync</span><span class="hljs-params">(String name)</span></span>&#123;<br>       <span class="hljs-keyword">try</span> &#123;<br>           Thread.sleep(<span class="hljs-number">10000</span>);<br>           logger.info(<span class="hljs-string">"这里是异步方法"</span>);<br>           logger.info(<span class="hljs-string">"传过来的名字是："</span> + name);<br>           name = <span class="hljs-string">"修改的名字"</span>;<br>           logger.info(<span class="hljs-string">"修改后的名字是："</span> + name);<br>           <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> AsyncResult&lt;&gt;(<span class="hljs-string">"name: "</span> + name);<br>       &#125;<span class="hljs-keyword">catch</span> (Exception e)&#123;<br>           <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> AsyncResult&lt;&gt;(<span class="hljs-string">"异常"</span>);<br>       &#125;<br>   &#125;<br></code></pre></td></tr></table></figure>
<h4 id="调用异步方法"><a href="#调用异步方法" class="headerlink" title="调用异步方法"></a>调用异步方法</h4><ul>
<li>1、用Future获取返回值<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><code class="hljs java"><span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">requestAnsync</span><span class="hljs-params">(String name)</span></span>&#123;<br>        <span class="hljs-keyword">try</span> &#123;<br>            Long start = System.currentTimeMillis();<br>            Future&lt;String&gt; result = ansync(name);<br>            <span class="hljs-keyword">if</span> (result.isDone())&#123;<br>                name = result.get();<br>                logger.info(<span class="hljs-string">"异步方法结束，名字改为："</span> + name);<br>            &#125;<br>            Long end = System.currentTimeMillis();<br>            logger.info(<span class="hljs-string">"耗时："</span> + (<span class="hljs-keyword">int</span>)(end-start));<br>            <span class="hljs-keyword">return</span> <span class="hljs-string">"hello "</span> + name;<br>        &#125;<span class="hljs-keyword">catch</span> (Exception e)&#123;<br>            logger.error(<span class="hljs-string">"异常"</span>);<br>            <span class="hljs-keyword">return</span> <span class="hljs-string">"异常"</span>;<br>        &#125;<br>    &#125;<br></code></pre></td></tr></table></figure>
</li>
</ul>
<p>返回值，若想获取到返回值，应该轮询方法获取，否则若果没有isDone则不会走下面的方法，或者可以使用CompletableFuture：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs undefined">2018-07-17 11:31:55.390  INFO 5232 --- [nio-8080-exec-6] c.e.async.service.AsyncTestService       : 耗时：0<br>2018-07-17 11:32:05.394  INFO 5232 --- [cTaskExecutor-3] com.example.async.service.AsyncTest      : 这里是异步方法<br>2018-07-17 11:32:05.394  INFO 5232 --- [cTaskExecutor-3] com.example.async.service.AsyncTest      : 传过来的名字是：ling<br>2018-07-17 11:32:05.394  INFO 5232 --- [cTaskExecutor-3] com.example.async.service.AsyncTest      : 修改后的名字是：修改的名字<br></code></pre></td></tr></table></figure></p>
<p>如果使用future.get()方法会阻塞线程直到拿到结果。</p>
<ul>
<li>2、不使用future.get()方法，异步方法不使用Future返回<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><code class="hljs java"><span class="hljs-meta">@Async</span><br><span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">noReturnAsync</span><span class="hljs-params">(String name)</span></span>&#123;<br>    <span class="hljs-keyword">try</span> &#123;<br>        Thread.sleep(<span class="hljs-number">10000</span>);<br>        logger.info(<span class="hljs-string">"这里是异步方法"</span>);<br>        logger.info(<span class="hljs-string">"传过来的名字是："</span> + name);<br>        name = <span class="hljs-string">"修改的名字"</span>;<br>        logger.info(<span class="hljs-string">"修改后的名字是："</span> + name);<br>    &#125;<span class="hljs-keyword">catch</span> (Exception e)&#123;<br>    &#125;<br>&#125;<br></code></pre></td></tr></table></figure>
</li>
</ul>
<p>调用异步的方法<br><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs java"><span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">noReturn</span><span class="hljs-params">(String name)</span></span>&#123;<br>        Long start = System.currentTimeMillis();<br>        asyncTest.noReturnAsync(name);<br>        Long end = System.currentTimeMillis();<br>        logger.info(<span class="hljs-string">"耗时："</span> + (<span class="hljs-keyword">int</span>)(end-start));<br>        <span class="hljs-keyword">return</span> <span class="hljs-string">"hello "</span> + name;<br>    &#125;<br></code></pre></td></tr></table></figure></p>
<h4 id="注意的地方："><a href="#注意的地方：" class="headerlink" title="注意的地方："></a>注意的地方：</h4><p>如果异步方法变成阻塞的同步方法，可能原因是异步方法和普通的调用方法在同一个类中，解决方法是将异步方法单独放到一个类中。<br>产生原因：spring对@Transactional注解时也有类似问题，spring扫描时具有@Transactional注解方法的类时，是生成一个代理类，由代理类去开启关闭事务，而在同一个类中，方法调用是在类体内执行的，spring无法截获这个方法调用。<br>具体参见：<a href="https://www.cnblogs.com/shihaiming/p/7825204.html" target="_blank" rel="noopener">Spring Boot使用@Async实现异步调用</a></p>

      
    </div>
    <footer class="article-footer">
      
        <div id="donation_div"></div>

<script src="/newblog/js/vdonate.js"></script>
<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: 'https://raw.githubusercontent.com/lgsdaredevil/newblog/master/css/images/wechatlike.jpg',
  alipayImage: 'https://raw.githubusercontent.com/lgsdaredevil/newblog/master/css/images/alipay.png'
});
</script>
      
      
      <div>
        <ul class="post-copyright">
          <li class="post-copyright-author">
          <strong>Post author:  </strong></a>
          </li>
          <li class="post-copyright-link">
          <strong>Post link:  </strong>
          <a href="/newblog/2018/07/17/spring-boot使用@Async异步任务/" target="_blank" title="spring boot使用@Async异步任务">http://github.com/lgsdaredevil/2018/07/17/spring-boot使用@Async异步任务/</a>
          </li>
          <li class="post-copyright-license">
            <strong>Copyright Notice:   </strong>
            All articles in this blog are licensed under <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">CC BY-NC-ND 4.0</a>
            unless stating additionally.
          </li>
         
        </ul>
<div>

      
      
        
	<div id="comment">
		<!-- 来必力City版安装代码 -->
		<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTQ4MS82MDQ5">
		<script type="text/javascript">
		   (function(d, s) {
		       var j, e = d.getElementsByTagName(s)[0];

		       if (typeof LivereTower === 'function') { return; }

		       j = d.createElement(s);
		       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
		       j.async = true;

		       e.parentNode.insertBefore(j, e);
		   })(document, 'script');
		</script>
		<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
		</div>
		<!-- City版安装代码已完成 -->
	</div>



      
      

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/newblog/2018/07/28/java虚拟机笔记（一）/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          java虚拟机笔记（一）
        
      </div>
    </a>
  
  
    <a href="/newblog/2018/07/13/hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Hello World</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="toc-sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
        <ol class="nav"><li class="nav-item nav-level-4"><a class="nav-link" href="#开启异步任务"><span class="nav-number">1.</span> <span class="nav-text">开启异步任务</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#写异步任务方法"><span class="nav-number">2.</span> <span class="nav-text">写异步任务方法</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#调用异步方法"><span class="nav-number">3.</span> <span class="nav-text">调用异步方法</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#注意的地方："><span class="nav-number">4.</span> <span class="nav-text">注意的地方：</span></a></li></ol>
    
    </div>
  </aside>

</section>
        
      </div>
      
      <footer id="footer">
  

  <div class="container">
      	<div class="row">
	      <p> Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/lgsdaredevil/newblog/tree/resource-newblog" target="_blank">resource-newblog</a> </p>
	      <p id="copyRightEn">Copyright &copy; 2013 - 2018  All Rights Reserved.</p>
        <!--<p id="copyRightEn">Copyright &copy; 2013 - 2018 小森的博客 All Rights Reserved.</p> -->
	      
	      
    		<p class="busuanzi_uv">
				访客 : <span id="busuanzi_value_site_uv"></span> |  
				浏览量 : <span id="busuanzi_value_site_pv"></span>
		    </p>
  		   
		</div>

		
  </div>
</footer>


<!-- min height -->

<script>
    var wrapdiv = document.getElementById("wrap");
    var contentdiv = document.getElementById("content");
    var allheader = document.getElementById("allheader");

    wrapdiv.style.minHeight = document.body.offsetHeight + "px";
    if (allheader != null) {
      contentdiv.style.minHeight = document.body.offsetHeight - allheader.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    } else {
      contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    }
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/newblog/" class="mobile-nav-link">主页</a>
  
    <a href="/newblog/archives" class="mobile-nav-link">文章</a>
  
    <a href="/newblog/categories" class="mobile-nav-link">分类</a>
  
    <a href="/newblog/tags" class="mobile-nav-link">标签</a>
  
    <a href="/newblog/about" class="mobile-nav-link">关于</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  <link rel="stylesheet" href="/newblog/fancybox/jquery.fancybox.css">
  <script src="/newblog/fancybox/jquery.fancybox.pack.js"></script>


<script src="/newblog/js/scripts.js"></script>




  <script src="/newblog/js/dialog.js"></script>








	<div style="display: none;">
    <script src="https://s95.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
  </div>



	<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="myModalLabel">设置</h2>
      </div>
      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">


      <div class="modal-body">
          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="javascript:setFontSize();" aria-expanded="true" aria-controls="collapseOne">
              正文字号大小
            </a>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            您已调整页面字体大小
          </div>
        </div>
      


          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" onclick="javascript:setBackground();" aria-expanded="true" aria-controls="collapseTwo">
              夜间护眼模式
            </a>
        </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            夜间模式已经开启，再次单击按钮即可关闭 
          </div>
        </div>

        <div>
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关 于&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
         <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
          <div class="panel-body">
            小森的博客
          </div>
          <div class="panel-body">
            Copyright © 2018 小森的博客 All Rights Reserved.
          </div>
        </div>
      </div>


      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <div class="modal-footer">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      </div>
    </div>
  </div>
</div>
  
  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/js/totop.js?v=1.0.0" async=""></script>
  
    <a id="menu-switch"><i class="fa fa-bars fa-lg"></i></a>
  
</body>
</html>